import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const store = new Vuex.Store({
    state:{
        roleList:[]
    },
    mutations:{
        Clean_list (state) {
            state.roleList =[]
        },
        SAVE_list (state,roleList){
            state.roleList = roleList
        },
        SET_ROUTERS: (state, routers) => {
            state.addRouters = routers
            state.routers = constantRouterMap.concat(routers)
          }
    }
})

export default store